package com.zfzs.post;

import com.zfzs.post.utils.SpringContextHolder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import java.time.LocalDate;
import java.time.LocalTime;

/**
* 后台服务启动器
* @author: ck
* @create: 2019/7/31/17:51
**/
@EnableAsync
@SpringBootApplication
@EnableTransactionManagement
public class AdminApplication {

    private static Logger log = LoggerFactory.getLogger(AdminApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(AdminApplication.class, args);
        log.info("《《《《《《  SUCCESS biu-baobao-admin Biu宝宝后台管理服务启动成功 {} {} 》》》》》》", LocalDate.now(), LocalTime.now());
    }

    @Bean
    public SpringContextHolder springContextHolder() {
        return new SpringContextHolder();
    }
}
